package Com.HupochuanAdmin.Dal.Tab;

import java.util.Hashtable;
import java.util.List;
import java.util.Vector;

import Com.Hupochuan.Dal.DBManager.DBManager;
import Com.Hupochuan.Vo.SourceSubtitle;

public class SourceSubtitleTab {
	/*
	 * 本类私有对象
	 */
	private DBManager<SourceSubtitle> dbManager = new DBManager<SourceSubtitle>(SourceSubtitle.class);
	
	/*
	 * 单一实例
	 */
	private SourceSubtitleTab(){}
	private static SourceSubtitleTab sourceSubtitle = new SourceSubtitleTab();
	public static SourceSubtitleTab getObject(){
		return sourceSubtitle;
	}
	
	/*
	 * 获得资源字幕列表
	 */
	public List<SourceSubtitle> findSourceSubtitleList(){
		//参数部分
		List<SourceSubtitle> sourceSubtitleList = new Vector<SourceSubtitle>();
		StringBuffer sqlBuff = new StringBuffer();
		Hashtable<String,Object> paraHash = new Hashtable<String,Object>();
		
		//sql语句部分
		sqlBuff.append(" select * from SourceSubtitle ");
		sqlBuff.append(" order by weight desc,id ");
		
		//执行sql 
		sourceSubtitleList = this.dbManager.querySqlReturnVoList(sqlBuff.toString(),paraHash);
		
		//返回列表
		return sourceSubtitleList;
	}
}
